<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=">
<meta
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
	name="viewport">
<meta name="format-detection" content="telphone=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<!-- UC强制全屏 -->  
 <meta name="full-screen" content="yes">  
 <!-- QQ强制全屏 -->  
 <meta name="x5-fullscreen" content="true">  
 <!-- UC应用模式-->  
 <meta name="browsermode" content="application">  
 <!-- QQ应用模式 -->  
 <meta name="x5-page-mode" content="app"> 
<title>{$title}</title>
</head>
<link rel="stylesheet" href="__TEMPLATE__/mobile/index/css/global.css"
	type="text/css">
<script src="__TEMPLATE__/sysme/js/jquery-1.9.1.min.js"></script>
<style>
body,#wrapper_1 {
	-webkit-overflow-scrolling: touch;
	overflow-scrolling: touch;
} /*解决苹果滚动条卡顿的问题*/

</style>
<style>
body{
	background-color: #f5f5f9;
}
.gray {
	-webkit-filter: grayscale(100%);
	-moz-filter: grayscale(100%);
	-ms-filter: grayscale(100%);
	-o-filter: grayscale(100%);
	filter: grayscale(100%);
	filter: gray;
}

</style>
<script>
	//覆盖（重写 ）iscro-lot.js 同名方法避免bug产生 (只有使用IScroll.js的地方才需要调用iscro-lot.js文件中的 loaded()方法 )
	function loaded() {
	}//空实现
	firstPage = 0;//常亮
	//  document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false); //uc浏览器滑动
</script>


	
<link rel="stylesheet" href="__TEMPLATE__/mobile/index/css/index.css" type="text/css">
<link rel="stylesheet" href="__TEMPLATE__/mobile/index/css/member.css" type="text/css">
<script type="text/javascript" src="__TEMPLATE__/sysme/js/user_name.js"></script>
<link rel="stylesheet" type="text/css" href="__SYSMET__/lib/Hui-iconfont/1.0.8/iconfont.css" />
<style type="text/css">
 .header>*{float:left;position:relative;}
 #data_shaixuan div{width:100%;height:40px;line-height:40px;border-bottom:1px solid #ccc;background:#fff;text-align: center;}
 #detial_list{width:100%;height:145px;background:#fff;top:44px;position:absolute;z-index: 100;padding:15px 1%;display:none;}
 #detial_list div{width:22%;height:25px;line-height:25px;margin-right:4%;text-align: center;float:left;border:1px solid #ccc;margin-bottom:10px;font-size:12px;}
 #detial_list div:nth-child(4n){margin-right:0;}
 .content{width:100%;height:auto;margin-top:44px;border-bottom:1px solid #ccc;}
 .con_header{width:100%;height:38px;line-height:38px;display:flex;}
 .con_header p{flex:1;font-size:16px;text-align: center;}
 .con_list{width:100%;height:38px;line-height:38px;display:flex;border-top:1px solid #ccc;}
 .con_list p{flex:1;font-size:14px;text-align: center;}
</style>
<body>
<div class="header">
		<div class="ui-toolbar-left">
			<button id="reveal-left" onClick="javascript:window.location.href='{:url('member/index')}'">reveal</button>
		</div>
		<h1  style="width:30%;height:25px;line-height:25px;margin-top:8px;border:2px solid #fff;color:#fff;margin-left:36%;" class="detial_content" sf_click="yes">
			<span id="detial_content">
				{switch name="$type"}
				{case value="0"}全部{/case}
				{case value="1"}公司入款{/case}
				{case value="2"}线下入款{/case}
				{case value="3"}人工入款{/case}
				{case value="4"}活动优惠{/case}
				{case value="5"}投注撤单{/case}
				{case value="6"}提款退还{/case}
				{case value="7"}代理返佣{/case}
				{case value="8"}中奖派送{/case}
				{case value="9"}退款记录{/case}
				{case value="10"}投注记录{/case}
				{default /}未知
			{/switch}
			</span>&nbsp;<i class="Hui-iconfont">&#xe6d5;</i>
		</h1>
        <div style="float:right;color:#fff;height:100%;line-height:44px;margin-right:3%;font-weight: 500;font-size:18px;" class="riqi" rq_sf_click="yes" >
			<span id="riqi">
				{switch name="$date"}
				{case value="0"}今天{/case}
				{case value="1"}昨天{/case}
				{case value="2"}本周{/case}
				{case value="3"}本月{/case}
				{case value="4"}上月{/case}
				{default /}未知
			{/switch}
			</span>&nbsp;<i class="Hui-iconfont">&#xe6d5;</i>
		</div>
        
</div>
<div class="content">
	<div class="con_header">
		<p>类型</p>
		<p>交易金额</p>
		<p>交易后金额</p>
		<p>日期</p>
	</div>
	{volist name="list" id="item"  key="k"}
	<div class="con_list">
		<p>
			{switch name="$item.label"}
				{case value="1"}公司入款{/case}
				{case value="2"}线下入款{/case}
				{case value="3"}人工入款{/case}
				{case value="4"}活动优惠{/case}
				{case value="5"}投注撤单{/case}
				{case value="6"}提款退还{/case}
				{case value="7"}代理返佣{/case}
				{case value="8"}中奖派送{/case}
				{case value="9"}退款记录{/case}
				{case value="10"}投注记录{/case}
				{default /}未知
			{/switch}
		</p>
		<p style="color:#ee5124;">{if($item.label==10 || $item.label==9)}-{else/}+{/if}{$item.je}</p>
		<p style="color:#ee5124;">
			{if(7==$item.label)}
				{$item.je+$item.hje}
			{elseif(6==$item.label)}
				---
			{elseif(8==$item.label)}
				{$item.je+$item.hje}
			{elseif(5==$item.label)}
				{$item.je+$item.hje}
			
			{else/}
				{$item.hje}
			{/if}
		</p>
		<p>{$item.time|date="Y-m-d",###}</p>
	</div>
	{/volist}
</div>
<div style="width:100%; height:50px; margin:auto; line-height:50px; margin-top:10px; margin-bottom:10px; padding-left:5px; font-size:12px;background-color: white;">
<div style="float:left; width:65%">共{$total_page}页,{$total}条，当前第：{$page}页</div>
<div style="float:right; width:30%">
	{if($page>1)} <a data-page="{$page-1}" onclick="reloadInfo(this,2)" href="javascript:;">上一页</a> {/if}
	{if($total_page > $page)} <a data-page="{$page+1}" href="javascript:;" onclick="reloadInfo(this,2)"  style="margin-left:10px">下一页</a> {/if}
</div>
</div>
<div id="detial_list">
	<div onclick="reloadInfo(0,0)" {if(0==$type)} style="border-color:red" {/if}>全部</div>
	<div onclick="reloadInfo(1,0)" {if(1==$type)} style="border-color:red" {/if}>公司入款</div>
	<div onclick="reloadInfo(2,0)" {if(2==$type)} style="border-color:red" {/if}>线下入款</div>
	<div onclick="reloadInfo(3,0)" {if(3==$type)} style="border-color:red" {/if}>人工入款</div>
	<div onclick="reloadInfo(4,0)" {if(4==$type)} style="border-color:red" {/if}>活动优惠</div>
	<div onclick="reloadInfo(5,0)" {if(5==$type)} style="border-color:red" {/if}>投注撤单</div>
	<div onclick="reloadInfo(6,0)" {if(6==$type)} style="border-color:red" {/if}>提款退还</div>
	<div onclick="reloadInfo(7,0)" {if(7==$type)} style="border-color:red" {/if}>代理返佣</div>
	<div onclick="reloadInfo(8,0)" {if(8==$type)} style="border-color:red" {/if}>中奖派送</div>
	<div onclick="reloadInfo(9,0)" {if(9==$type)} style="border-color:red" {/if}>退款记录</div>
	<div onclick="reloadInfo(10,0)" {if(10==$type)} style="border-color:red" {/if}>投注记录</div>
</div>
	
<div id="data_shaixuan" style="width:100%;height:auto;bottom:0;background:#fff;z-index: 100;position:fixed;display:none;border-top:1px solid #ccc;">
	<div onclick="reloadInfo(0,1)">今天</div>
	<div onclick="reloadInfo(1,1)">昨天</div>
	<div onclick="reloadInfo(2,1)">本周</div>
	<div onclick="reloadInfo(3,1)">本月</div>
	<div onclick="reloadInfo(4,1)">上月</div>
</div>
<div id="data_zhezhao" style="height: 100%;width:100%;position:fixed;display:none;background-color: black;opacity: 0.3;z-index:99;top:0;">
</div>

</body>
<script>
	/**
	 * @param method 方案：0，类型，1：时间，2，页码
	 * @param key
     */
	var type = {$type};
	var search = {$date};
	function reloadInfo(key,method){
		var url = window.location.pathname;
		if( 2==method ){
			url += '?date='+search+'&type='+type+'&page='+$(key).data("page");
		}else if(0==method){
			url += '?date='+search+'&type='+key+'&page='+1;
		}else{
			url += '?date='+key+'&type='+type+'&page='+1;
		}
		window.location.href  = url;
	}
$('.riqi').click(function(){
	$('#detial_list').hide()
	$('.detial_content').attr('sf_click','yes')
	if($(this).attr('rq_sf_click')=='yes'){
	   $('#data_shaixuan').show()
	   $('#data_zhezhao').show()
	    $('.riqi').attr('rq_sf_click','no')
	}else{
	   $('#data_shaixuan').hide()
	   $('#data_zhezhao').hide()
	   $('.riqi').attr('rq_sf_click','yes')
	}
})
$('.detial_content').click(function(){
	
	$('#data_shaixuan').hide()
	 $('.riqi').attr('rq_sf_click','yes')
	if($(this).attr('sf_click')=='yes'){
		$('#detial_list').show()
	    $('#data_zhezhao').show()
	    $('.detial_content').attr('sf_click','no')
	}else{
		$('#detial_list').hide()
	    $('#data_zhezhao').hide()
	     $('.detial_content').attr('sf_click','yes')
	}
	
	
})
$('#data_zhezhao').click(function(){
	$('#data_shaixuan').hide()
	$('#data_zhezhao').hide()
	$('#detial_list').hide()
	$('.riqi').attr('rq_sf_click','yes')
	$('.detial_content').attr('sf_click','yes')
})
$('#data_shaixuan div').click(function(){
	
	var riqi=$(this).html()
	$('#riqi').html(riqi)
	$('#data_shaixuan').hide()
	$('#data_zhezhao').hide()
	$('.riqi').attr('sf_click','yes')
	
	
})

$('#detial_list div').click(function(){
	$('#detial_list div').css('borderColor','#ccc')
	$(this).css('borderColor','red')
	var detial_content=$(this).html()
	$('#detial_content').html(detial_content)
	$('#detial_list').hide()
	$('#data_zhezhao').hide()
	$('.detial_content').attr('sf_click','yes')
	
})
	
</script>
</html>
